package com.example.backspring.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.backspring.entity.Student;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;


@Mapper
public interface StudentMapper extends BaseMapper<Student> {
@Insert("insert into student(id,username,pwd)values (#{id},#{username},#{pwd})")
 int add(String id,String username,String pwd);

@Select("select count(1) from student where username=#{username} and pwd=#{pwd}")
 int login(String username,String pwd);
}
